<?php

namespace app\admin\model;

use think\Model;

class LoginLog extends Model
{
    protected $autoWriteTimestamp = 'datetime';

    public static function saveLoginLog($adminId){
        $data = [
            'admin_id'  =>  $adminId,
            'ip'    =>  request()->ip(),
            'ip_address'    =>  ''
        ];
        $res = self::create($data);
        return $res->id;
    }
}
